package org.fuxia.im.core.service;

import org.fuxia.im.core.ECMessageType;
import org.fuxia.im.core.service.impl.FileTransferService;
import org.fuxia.im.core.service.impl.PacketDispathService;
import org.fuxia.im.core.service.impl.ServiceLogin;

@Deprecated
public class ServiceFactory
{
	public static ECService newInstance(ECMessageType messageType)
	{
		switch (messageType)
		{
			case ACK:
				return null;
			case LOGIN:
			case LOGOUT:
				return new ServiceLogin();
			case PLAINMESSAGE:
				return new PacketDispathService();
			case FILE_TRANSFER_ACK:
			case FILE_TRANSFER_INFO:
				return new FileTransferService();
			default:
				return null;
		}
	}
}
